package com.jianbing.north.mapper;

import java.util.List;

import com.jianbing.north.domain.NorthQues;
import com.jianbing.north.domain.NorthQuesStem;
import org.apache.ibatis.annotations.Param;

/**
 * 题干Mapper接口
 * 
 * @author ruoyi
 * @date 2024-06-20
 */
public interface NorthQuesStemMapper 
{
    /**
     * 查询题干
     * 
     * @param id 题干主键
     * @return 题干
     */
    public NorthQuesStem selectNorthQuesStemById(Long id);

    /**
     * 查询题干列表
     * 
     * @param northQuesStem 题干
     * @return 题干集合
     */
    public List<NorthQuesStem> selectNorthQuesStemList(NorthQuesStem northQuesStem);

    /**
     * 新增题干
     * 
     * @param northQuesStem 题干
     * @return 结果
     */
    public int insertNorthQuesStem(NorthQuesStem northQuesStem);

    /**
     * 修改题干
     * 
     * @param northQuesStem 题干
     * @return 结果
     */
    public int updateNorthQuesStem(NorthQuesStem northQuesStem);

    /**
     * 删除题干
     * 
     * @param id 题干主键
     * @return 结果
     */
    public int deleteNorthQuesStemById(Long id);

    /**
     * 批量删除题干
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteNorthQuesStemByIds(Long[] ids);

    Long selectDialogueIdNotDoQuesStemByUserIdAndPartAndDifficult(@Param("userId")Long userId, @Param("part")Long part, @Param("difficulty")Long difficulty);

    List<NorthQues> selectQuesStemByDialogueId(Long dialogueId);

    NorthQuesStem selectUnDoP3QuesByUserIdAndDifficulty(@Param("userId") Long userId,@Param("difficulty") Long difficulty);

    String selestQuesByDialogueId(Long dialogueId);
}
